{% load format %}
{% if request.mobile %}
  <div id="footer">
    <ul>
    {% if request.user %}
      <li><a href="{% url_for request.user request %}/overview" accesskey="0">Overview</a> [0]</li>
      <li><a href="{% url_for request.user request %}" accesskey="1">Your {{POST_NAME}}s</a> [1]</li>
      <li><a href="{% url_for request.user request %}/contacts" accesskey="2">People</a> [2]</li>
      <li><a href="{% url_for DOMAIN request %}/channel" accesskey="3">Channels</a> [3]</li>
      <li><a href="{% url_for DOMAIN request %}/explore">Explore</a></li>
      <li><a href="{% url_for request.user request %}/settings">Settings</a></li>
      <li><a href="{% url_for DOMAIN request %}/logout">Sign out</a></li>
    {% else %}
      {# Avoid redirecting login to logout. A separate sign-in link exists in the login template #}
      {% ifnotequal request.META.PATH_INFO "/logout" %}
        {% if SUBDOMAINS_ENABLED %}
          <li><a href="{% url_for DOMAIN request %}/login?redirect_to=http://{{request.META.HTTP_HOST}}{{request.META.PATH_INFO}}">Sign In</a></li>
        {% else %}
          <li><a href="{% url_for DOMAIN request %}/login?redirect_to={{request.META.PATH_INFO}}">Sign In</a></li>
        {% endif %}
      {% endifnotequal %}
      <li><a href="{% url_for DOMAIN request %}/join?redirect_to=/&amp;force=1">Join {{SITE_NAME}}</a></li>
      <li><a href="{% url_for DOMAIN request %}/explore">Explore</a></li>
    {% endif %}
    {% if BLOG_ENABLED %}
      <li><a href="{{BLOG_URL}}">Blog</a></li>
    {% endif %}
    </ul>
  </div>
{% else %}
  {% ifnotequal area 'welcome' %}
  <div id="footer">
    &#169; {{component.best.legal.copyright}}
    <a href="http://{{DOMAIN}}/about">About</a> |
    <a href="http://{{DOMAIN}}/help">FAQ</a> |
    <a href="http://{{DOMAIN}}/channel/{{SUPPORT_CHANNEL}}">Support</a> |
    <a href="http://{{DOMAIN}}/privacy">Privacy</a> |
    <a href="http://{{DOMAIN}}/terms">{{component.best.legal.terms_title}}</a>
    | <a href="http://{{DOMAIN}}/api">API</a>
    {% if BLOG_ENABLED %}
    | <a href="{{BLOG_URL}}">Blog</a>
    {% endif %}
  </div>
  {% endifnotequal %}
{% endif %}
